package cn.edu.fzu.homemaking.sso.service;

import cn.edu.fzu.homemaking.sso.domain.enums.SexEnum;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.Date;

public interface LoginService {

    /** 邮箱登陆 **/
    void login(String email, String password, String code, HttpSession session);


    /** 人脸登陆 **/
    void faceLogin(String face, HttpSession session);


    /** 图片验证码 **/
    String imgCode(String email, HttpSession session) throws IOException;


    /** 登出 **/
    void logout(HttpSession session);


    /** 注册 **/
    void register(String email, String password, String name, SexEnum sex, Date birth, String phone, String address,
                  String faceUrl, String code, HttpSession session);


    /** 上传人脸 **/
    String uploadFace(MultipartFile face);


    /** 发送邮箱验证码 **/
    void sendEmailCode(String email, HttpSession session);


    /** 注册公司管理账户 **/
    void registerCompanyAdmin(String email, String password, String name, SexEnum sex, Date birth, String phone,
                              String address, String faceUrl, String code, String companyName, String creditCode,
                              String legalPerson, String businessLicense, String contact, String companyPhone,
                              Long areaId, String companyAddress, HttpSession session);


    /** 修改密码 **/
    void updatePassword(String email, String code, String password, HttpSession session);

}
